package com.web.dao;

import com.web.pojo.domain.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: wws
 * describe:
*/
@Mapper
@Repository
public interface UserAddressDao {

    /**
     * 添加用户与地址树根节点的关联
     * @param userId 用户Id
     * @param AddressId 根节点
     * @return 结果
     */
    public Integer insertUserAddress(@Param("userId") Integer userId,@Param("AddressId") Integer AddressId);

    /**
     * 根据用户查询根节点
     * @param userId 用户id
     * @return 结果
     */
    public List<Address> selectAddressByUserId(Integer userId);


}
